package com.gexin.controller.xapp.transfer;

import com.gexin.common.job.ActivityJob;
import com.gexin.common.model.ApiResponse;
import com.gexin.core.interceptor.XAppSafeInterceptor;
import com.gexin.core.web.AppController;
import com.gexin.model.weixin.WeixinUser;
import com.gexin.model.weixin.WeixinUserCoupon;
import com.jfinal.aop.Before;
import com.jfinal.ext.route.ControllerBind;
import com.jfinal.log.Log;

//@Before(XAppSafeInterceptor.class)//统一错误拦截
@ControllerBind(controllerKey = "/xapp/order/pay/transfer")
public class PointsForGoods extends AppController {
    static Log log = Log.getLog(ActivityJob.class);

    /** 设置支付密码 */
    public void AddpaymentodeP(){
        int transfer_password=getParaToInt("transfer_password");
        int user_id=getParaToInt("user_id");
        WeixinUser weixinUser=new WeixinUser();
        weixinUser.setId(user_id);
        //weixinUser.setTransferPassword(transfer_password);
        System.out.println(weixinUser);
        Boolean flag=weixinUser.update();
        renderJson(new ApiResponse(flag, flag ? "添加成功!" : "添加失败!"));
        return;
    }

    /** 兑换卷兑换 */
    public void ExchangeBillExchange(){
        //用户id
        int userId=getParaToInt("user_id");
        //商品id
        int productId=getParaToInt("productId");
        //兑换卷数额
        int ExchangeBillAmount=getParaToInt("ExchangeBillAmount");

    }

}